package appfight.level;

import org.anddev.andengine.entity.scene.background.ColorBackground;

import appfight.map.ChangeSceneObject;
import appfight.map.ConnectObject;
import appfight.map.MapObject;
import appfight.map.GameMap.MapBlockIndex;
import appfight.map.GameObjectMap.Map_Object;

public class ConnectRoom extends GameLevelMap{
	
	
	@Override
	protected int[][] CreateGameMap()
	{
		int[][] gameMap = new int[9][9];

		for(int i = 0;i<9;i++)
		{
			for(int j = 0;j<9;j++)
			{
				gameMap[j][i]=MapBlockIndex.connect_room_floor.ordinal();
			}
		}
		
		for(int i = 0;i<9;i++)
		{
			for(int j = 0;j<1;j++)
			{
				gameMap[j][i]=6;
			}
		}
		return gameMap;
	}

	
	@Override
	protected MapObject[][] CreateObjectMap()
	{

		MapObject[][] gameObjectMap = new MapObject[9][9];
		gameObjectMap[1][0] = new MapObject(Map_Object.Bookshelf);
		gameObjectMap[1][1] = new MapObject(Map_Object.Bookshelf);
		gameObjectMap[1][2] = new MapObject(Map_Object.Bookshelf);
		gameObjectMap[1][8] = new MapObject(Map_Object.Bookshelf);
		gameObjectMap[1][7] = new MapObject(Map_Object.Bookshelf);
		gameObjectMap[1][6] = new MapObject(Map_Object.Bookshelf);
		
		gameObjectMap[3][3] = new MapObject(Map_Object.Magic);
		gameObjectMap[3][4] = new ConnectObject(Map_Object.ConnectObject,this._activity);
		
		gameObjectMap[8][4] = new ChangeSceneObject(Map_Object.Rug,this,"MainTown",20,12);
		
		return gameObjectMap;
		
	}
	@Override
	protected void LevelDesignEnd()
	{
		_camera.setCenter(4*32, 5*32);
		_activity.scene.setBackground(new ColorBackground(0,0,0));
	}
}
